<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
  <head>
    <meta charset="utf-8" />
    <meta name="generator" content="pandoc" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, user-scalable=yes"
    />
    <title>Data_Structures_Questions</title>
    <style type="text/css">
      code {
        white-space: pre-wrap;
      }
      span.smallcaps {
        font-variant: small-caps;
      }
      span.underline {
        text-decoration: underline;
      }
      div.column {
        display: inline-block;
        vertical-align: top;
        width: 50%;
      }
    </style>
  </head>
  <body>
    <p>
      Answer the following questions for each of the data structures you
      implemented as part of this project.
    </p>
    <h2 id="queue">Queue</h2>
    <ol type="1">
      <li>
        <p>What is the runtime complexity of <code>enqueue</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>dequeue</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>len</code>?</p>
      </li>
    </ol>
    <h2 id="binary-search-tree">Binary Search Tree</h2>
    <ol type="1">
      <li>
        <p>What is the runtime complexity of <code>insert</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>contains</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>get_max</code>?</p>
      </li>
    </ol>
    <h2 id="heap">Heap</h2>
    <ol type="1">
      <li>
        <p>What is the runtime complexity of <code>_bubble_up</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>_sift_down</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>insert</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>delete</code>?</p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>get_max</code>?</p>
      </li>
    </ol>
    <h2 id="doubly-linked-list">Doubly Linked List</h2>
    <ol type="1">
      <li>
        <p>
          What is the runtime complexity of <code>ListNode.insert_after</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of <code>ListNode.insert_before</code>?
        </p>
      </li>
      <li>
        <p>What is the runtime complexity of <code>ListNode.delete</code>?</p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.add_to_head</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.remove_from_head</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.add_to_tail</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.remove_from_tail</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.move_to_front</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.move_to_end</code>?
        </p>
      </li>
      <li>
        <p>
          What is the runtime complexity of
          <code>DoublyLinkedList.delete</code>?
        </p>
        <ol type="1">
          <li>
            Compare the runtime of the doubly linked list’s
            <code>delete</code> method with the worst-case runtime of the JS
            <code>Array.splice</code> method. Which method generally performs
            better?
          </li>
        </ol>
      </li>
    </ol>
  </body>
</html>
